<%@page contentType="text/html" pageEncoding="UTF-8"%>

   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<title>Registrasi SiReRe</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
</head>
<body id="top">
     <% String name = (String)session.getAttribute("name");
            if(name == null || "".equals(name)) { %>
    <div class="corner">
        <p><a class="login" href="Registration.jsp">Log in</a> </p>
    </div>
     <% } else { %>
     <p class="login"> Hello <%=session.getAttribute("name") %>! </p>
    <p><a class="logout" href="${pageContext.request.contextPath}/LoginServlet?logout=true">Log out</a></p>
    <% } %>
<div class="wrapper col1">
  <div id="head">
    <h1><a href="#">Registrasi</a></h1>
    
    <div id="topnav">
      <ul>
        <li><a  href="index.jsp">Home</a></li>
        <% if(name != null && !"".equals(name)) { %>
        <li><a  href="Reservation.jsp">Reservasi</a></li>
        <li><a href="${pageContext.request.contextPath}/MyProfile">Profil</a></li>
        <% } %>
      </ul>
    </div>
  </div>
</div>
<div class="wrapper col4">
  <div id="container">
    <div id="content">
      <h2>Siapakah Anda ??</h2>
       <% if( request.getAttribute("error")!=null) { %>
         <FONT COLOR="red"> <h2> error: ${error}  </h2></FONT>
       <% } %>
      <div class="homecontent">
        <ul>
          <li>Jika anda belum terdaftar :
            <form action="${pageContext.request.contextPath}/LoginServlet?register=true" method="post" >
              <p>Nama Depan :
  <input type="text" name="firstname" /> <br/> <br/>
                Nama Belakang : 
                <input type="text" name="surname" /> <br/> <br/>
                E-mail : <input type="text" name="email" /> <br/> <br/>
                Password : <input type="password" name="password" /> 
              </p>
              <p><br/>
                <input type="Submit" value="Register" />
              </p>
            </form>
          </li>
          <li class="last">Jika anda sudah terdaftar :
            <form action="${pageContext.request.contextPath}/LoginServlet?login=true" method="post" >
                <p>Email :
  <input type="text" name="email" /> <br/> <br/>
                  Password : <input type="password" name="password" /> 
                </p>
                <p><br/>
                  <input type="Submit" value="Log in" />
                </p>
            </form>
          </li>
        </ul>
        <div class="clear"></div>
      </div>
      
    </div>

    <div class="clear"></div>
  </div>
</div>

<div class="wrapper col5">
  <div id="footer">
    <!-- End Contact Form -->
    <div id="compdetails">
      <div id="officialdetails">
        
      </div>
      
    <!-- End Company Details -->
    
    <div class="clear"></div>
  </div>
</div>
</body>


</html>
